const c = require('./../schemas')

const AnalyticsLogEventSchema = c.object({
  title: 'Analytics Log Event',
  description: 'Analytics event logs.',
})

_.extend(AnalyticsLogEventSchema.properties, {
  user: c.objectId({ links: [{ rel: 'extra', href: '/db/user/{($)}' }] }),
  event: { type: 'string' },
  properties: { type: 'object' },
  archived: { type: 'boolean' },
})

c.extendBasicProperties(AnalyticsLogEventSchema, 'analytics.log.event')

module.exports = AnalyticsLogEventSchema
